home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / misc / dspice0s / lnkref.c < prev    next >
C/C++ Source or Header  |  1992-11-21  |  8KB  |  280 lines

  1. /* lnkref.f -- translated by f2c (version of 3 February 1990  3:36:42).
  2.    You must link the resulting object file with the libraries:
  3.     -lF77 -lI77 -lm -lc   (in that order)
  4. */
  5.  
  6. #include "f2c.h"
  7.  
  8. /* Common Block Declarations */
  9.  
  10. struct {
  11.     integer ielmnt, isbckt, nsbckt, iunsat, nunsat, itemps, numtem, isens, 
  12.         nsens, ifour, nfour, ifield, icode, idelim, icolum, insize, 
  13.         junode, lsbkpt, numbkp, iorder, jmnode, iur, iuc, ilc, ilr, 
  14.         numoff, isr, nmoffc, iseq, iseq1, neqn, nodevs, ndiag, iswap, 
  15.         iequa, macins, lvnim1, lx0, lvn, lynl, lyu, lyl, lx1, lx2, lx3, 
  16.         lx4, lx5, lx6, lx7, ld0, ld1, ltd, imynl, imvn, lcvn, nsnod, 
  17.         nsmat, nsval, icnod, icmat, icval, loutpt, lpol, lzer, irswpf, 
  18.         irswpr, icswpf, icswpr, irpt, jcpt, irowno, jcolno, nttbr, nttar, 
  19.         lvntmp;
  20. } tabinf_;
  21.  
  22. #define tabinf_1 tabinf_
  23.  
  24. struct {
  25.     integer locate[50], jelcnt[50], nunods, ncnods, numnod, nstop, nut, nlt, 
  26.         nxtrm, ndist, ntlin, ibr, numvs, numalt, numcyc;
  27. } cirdat_;
  28.  
  29. #define cirdat_1 cirdat_
  30.  
  31. struct {
  32.     integer iprnta, iprntl, iprntm, iprntn, iprnto, limtim, limpts, lvlcod, 
  33.         lvltim, itl1, itl2, itl3, itl4, itl5, itl6, igoof, nogo, keof;
  34. } flags_;
  35.  
  36. #define flags_1 flags_
  37.  
  38. struct {
  39.     doublereal value[200000];
  40. } blank_;
  41.  
  42. #define blank_1 blank_
  43.  
  44. /* Table of constant values */
  45.  
  46. static integer c__3 = 3;
  47. static integer c__9 = 9;
  48. static integer c__21 = 21;
  49. static integer c__22 = 22;
  50. static integer c__23 = 23;
  51. static integer c__24 = 24;
  52.  
  53. /*<       subroutine lnkref >*/
  54. /* Subroutine */ int lnkref_()
  55. {
  56.     /* System generated locals */
  57.     integer i_1, i_2, i_3;
  58.  
  59.     /* Local variables */
  60.     static integer iref, locp, nump, i;
  61.     extern /* Subroutine */ int fndnam_();
  62. #define nodplc ((integer *)&blank_1)
  63. #define cvalue ((complex *)&blank_1)
  64.     extern /* Subroutine */ int clrmem_();
  65.     static integer loc;
  66.  
  67. /*<       implicit double precision (a-h,o-z) >*/
  68.  
  69. /*     this routine resolves all unsatisfied name references. */
  70.  
  71. /* spice version 2g.6  sccsid=tabinf 3/15/83 */
  72. /*<       common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem, >*/
  73. /*<      1   isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize, >*/
  74. /*<      2   junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr, >*/
  75. /*<      3   nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1, >*/
  76. /*<      4   lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd, >*/
  77. /*<      5   imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval, >*/
  78. /*<      6   loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt, >*/
  79. /*<      7   irowno,jcolno,nttbr,nttar,lvntmp >*/
  80. /* spice version 2g.6  sccsid=cirdat 3/15/83 */
  81. /*<       common /cirdat/ locate(50),jelcnt(50),nunods,ncnods,numnod,nstop, >*/
  82. /*<      1   nut,nlt,nxtrm,ndist,ntlin,ibr,numvs,numalt,numcyc >*/
  83. /* spice version 2g.6  sccsid=flags 3/15/83 */
  84. /*<       common /flags/ iprnta,iprntl,iprntm,iprntn,iprnto,limtim,limpts, >*/
  85. /*<      1   lvlcod,lvltim,itl1,itl2,itl3,itl4,itl5,itl6,igoof,nogo,keof >*/
  86. /* spice version 2g.6  sccsid=blank 3/15/83 */
  87. /*<       common /blank/ value(200000) >*/
  88. /*<       integer nodplc(64) >*/
  89. /*<       complex cvalue(32) >*/
  90. /*<       equivalence (value(1),nodplc(1),cvalue(1)) >*/
  91.  
  92. /*  mutual inductors */
  93.  
  94. /*<       loc=locate(4) >*/
  95.     loc = cirdat_1.locate[3];
  96. /*<   100 if (loc.eq.0) go to 200 >*/
  97. L100:
  98.     if (loc == 0) {
  99.     goto L200;
  100.     }
  101. /*<       iref=nodplc(loc+2) >*/
  102.     iref = nodplc[loc + 1];
  103. /*<       call fndnam(value(iunsat+iref),loc-1,loc+2,3) >*/
  104.     i_1 = loc - 1;
  105.     i_2 = loc + 2;
  106.     fndnam_(&blank_1.value[tabinf_1.iunsat + iref - 1], &i_1, &i_2, &c__3);
  107. /*<       iref=nodplc(loc+3) >*/
  108.     iref = nodplc[loc + 2];
  109. /*<       call fndnam(value(iunsat+iref),loc-1,loc+3,3) >*/
  110.     i_1 = loc - 1;
  111.     i_2 = loc + 3;
  112.     fndnam_(&blank_1.value[tabinf_1.iunsat + iref - 1], &i_1, &i_2, &c__3);
  113. /*<       loc=nodplc(loc) >*/
  114.     loc = nodplc[loc - 1];
  115. /*<       go to 100 >*/
  116.     goto L100;
  117.  
  118. /*  current-controlled current source */
  119.  
  120. /*<   200 loc=locate(7) >*/
  121. L200:
  122.     loc = cirdat_1.locate[6];
  123. /*<   210 if (loc.eq.0) go to 300 >*/
  124. L210:
  125.     if (loc == 0) {
  126.     goto L300;
  127.     }
  128. /*<       nump=nodplc(loc+4) >*/
  129.     nump = nodplc[loc + 3];
  130. /*<       locp=nodplc(loc+6) >*/
  131.     locp = nodplc[loc + 5];
  132. /*<       do 220 i=1,nump >*/
  133.     i_1 = nump;
  134.     for (i = 1; i <= i_1; ++i) {
  135. /*<       iref=nodplc(locp+i) >*/
  136.     iref = nodplc[locp + i - 1];
  137. /*<       call fndnam(value(iunsat+iref),loc-1,locp+i,9) >*/
  138.     i_2 = loc - 1;
  139.     i_3 = locp + i;
  140.     fndnam_(&blank_1.value[tabinf_1.iunsat + iref - 1], &i_2, &i_3, &c__9)
  141.         ;
  142. /*<   220 continue >*/
  143. /* L220: */
  144.     }
  145. /*<       loc=nodplc(loc) >*/
  146.     loc = nodplc[loc - 1];
  147. /*<       go to 210 >*/
  148.     goto L210;
  149.  
  150. /*  current-controlled voltage sources */
  151.  
  152. /*<   300 loc=locate(8) >*/
  153. L300:
  154.     loc = cirdat_1.locate[7];
  155. /*<   310 if (loc.eq.0) go to 400 >*/
  156. L310:
  157.     if (loc == 0) {
  158.     goto L400;
  159.     }
  160. /*<       nump=nodplc(loc+4) >*/
  161.     nump = nodplc[loc + 3];
  162. /*<       locp=nodplc(loc+7) >*/
  163.     locp = nodplc[loc + 6];
  164. /*<       do 320 i=1,nump >*/
  165.     i_1 = nump;
  166.     for (i = 1; i <= i_1; ++i) {
  167. /*<       iref=nodplc(locp+i) >*/
  168.     iref = nodplc[locp + i - 1];
  169. /*<       call fndnam(value(iunsat+iref),loc-1,locp+i,9) >*/
  170.     i_2 = loc - 1;
  171.     i_3 = locp + i;
  172.     fndnam_(&blank_1.value[tabinf_1.iunsat + iref - 1], &i_2, &i_3, &c__9)
  173.         ;
  174. /*<   320 continue >*/
  175. /* L320: */
  176.     }
  177. /*<       loc=nodplc(loc) >*/
  178.     loc = nodplc[loc - 1];
  179. /*<       go to 310 >*/
  180.     goto L310;
  181.  
  182. /*  diodes */
  183.  
  184. /*<   400 loc=locate(11) >*/
  185. L400:
  186.     loc = cirdat_1.locate[10];
  187. /*<   410 if (loc.eq.0) go to 500 >*/
  188. L410:
  189.     if (loc == 0) {
  190.     goto L500;
  191.     }
  192. /*<       iref=nodplc(loc+5) >*/
  193.     iref = nodplc[loc + 4];
  194. /*<       call fndnam(value(iunsat+iref),loc-1,loc+5,21) >*/
  195.     i_1 = loc - 1;
  196.     i_2 = loc + 5;
  197.     fndnam_(&blank_1.value[tabinf_1.iunsat + iref - 1], &i_1, &i_2, &c__21);
  198. /*<       loc=nodplc(loc) >*/
  199.     loc = nodplc[loc - 1];
  200. /*<       go to 410 >*/
  201.     goto L410;
  202.  
  203. /*  bjts */
  204.  
  205. /*<   500 loc=locate(12) >*/
  206. L500:
  207.     loc = cirdat_1.locate[11];
  208. /*<   510 if (loc.eq.0) go to 600 >*/
  209. L510:
  210.     if (loc == 0) {
  211.     goto L600;
  212.     }
  213. /*<       iref=nodplc(loc+8) >*/
  214.     iref = nodplc[loc + 7];
  215. /*<       call fndnam(value(iunsat+iref),loc-1,loc+8,22) >*/
  216.     i_1 = loc - 1;
  217.     i_2 = loc + 8;
  218.     fndnam_(&blank_1.value[tabinf_1.iunsat + iref - 1], &i_1, &i_2, &c__22);
  219. /*<       loc=nodplc(loc) >*/
  220.     loc = nodplc[loc - 1];
  221. /*<       go to 510 >*/
  222.     goto L510;
  223.  
  224. /*  jfets */
  225.  
  226. /*<   600 loc=locate(13) >*/
  227. L600:
  228.     loc = cirdat_1.locate[12];
  229. /*<   610 if (loc.eq.0) go to 700 >*/
  230. L610:
  231.     if (loc == 0) {
  232.     goto L700;
  233.     }
  234. /*<       iref=nodplc(loc+7) >*/
  235.     iref = nodplc[loc + 6];
  236. /*<       call fndnam(value(iunsat+iref),loc-1,loc+7,23) >*/
  237.     i_1 = loc - 1;
  238.     i_2 = loc + 7;
  239.     fndnam_(&blank_1.value[tabinf_1.iunsat + iref - 1], &i_1, &i_2, &c__23);
  240. /*<       loc=nodplc(loc) >*/
  241.     loc = nodplc[loc - 1];
  242. /*<       go to 610 >*/
  243.     goto L610;
  244.  
  245. /*  mosfets */
  246.  
  247. /*<   700 loc=locate(14) >*/
  248. L700:
  249.     loc = cirdat_1.locate[13];
  250. /*<   710 if (loc.eq.0) go to 1000 >*/
  251. L710:
  252.     if (loc == 0) {
  253.     goto L1000;
  254.     }
  255. /*<       iref=nodplc(loc+8) >*/
  256.     iref = nodplc[loc + 7];
  257. /*<       call fndnam(value(iunsat+iref),loc-1,loc+8,24) >*/
  258.     i_1 = loc - 1;
  259.     i_2 = loc + 8;
  260.     fndnam_(&blank_1.value[tabinf_1.iunsat + iref - 1], &i_1, &i_2, &c__24);
  261. /*<       loc=nodplc(loc) >*/
  262.     loc = nodplc[loc - 1];
  263. /*<       go to 710 >*/
  264.     goto L710;
  265.  
  266. /*  finished */
  267.  
  268. /*<  1000 call clrmem(iunsat) >*/
  269. L1000:
  270.     clrmem_(&tabinf_1.iunsat);
  271. /*<       return >*/
  272.     return 0;
  273. /*<       end >*/
  274. } /* lnkref_ */
  275.  
  276. #undef cvalue
  277. #undef nodplc
  278.  
  279.  
  280.